<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <link rel="stylesheet" href="/api-test/static/plugins/layui/css/layui.css"/>
    <link rel="stylesheet" href="/api-test/static/css/home.css"/>
    <title>任务管理</title>
</head>

<body class="layui-view-body">
    <div class="layui-content">
        <div class="layui-row">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="form-box">
                        <div class="layui-form layui-form-item">
                            <form id="job-search-form" class="layui-inline">
                                <div class="layui-form-mid">任务名称:</div>
                                <div class="layui-input-inline" style="width: 160px;">
                                    <input type="text" name="name" autocomplete="off" class="layui-input" placeholder="请输入任务名称"/>
                                </div>
                                <div class="layui-form-mid">任务组名:</div>
                                <div class="layui-input-inline" style="width: 160px;">
                                    <input type="text" name="groupName" autocomplete="off" class="layui-input" placeholder="请输入任务组名"/>
                                </div>
                                <button class="layui-btn layui-btn-blue search-btn">查询</button>
                            </form>
							<div class="fr">
								<button class="layui-btn layui-bg-red" id="job-shutdown-all">全部停止</button>
								<button class="layui-btn layui-bg-blue" id="job-start-all">全部启动</button>
								<button class="layui-btn layui-bg-green" id="job-add">添加任务</button>
							</div>
                        </div>
                        <table class="layui-hide" id="job-table" lay-filter="job-table"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="job-add-dialog" class="layui-content" style="display: none">
        <form id="job-add-form" class="layui-form">
			<input type="hidden" name="token" />
            <div class="layui-form-item">
                <label class="layui-form-label">任务名称</label>
                <div class="layui-input-block" style="width: 200px">
                    <input type="text" name="name" required="required" lay-verify="required" placeholder="请输入任务名称" autocomplete="off" class="layui-input"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">任务组名</label>
                <div class="layui-input-block" style="width: 200px">
                    <input type="text" name="groupName" required="required" lay-verify="required" placeholder="请输入任务组名" autocomplete="off" class="layui-input"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">CRON</label>
                <div class="layui-input-block" style="width: 200px">
                    <input type="text" name="cronExp" required="required" lay-verify="required" placeholder="请输入CRON表达式" autocomplete="off" class="layui-input"/>
                </div>
            </div>
            <button id="job-add-submit" class="layui-btn" lay-submit="" lay-filter="job-add-submit" style="display: none;">提交</button>
        </form>
    </div>

    <div id="job-edit-dialog" class="layui-content edit-form" style="display: none;">
        <form id="job-edit-form" class="layui-form">
			<input type="hidden" name="token" />
             <div class="layui-form-item">
                <label class="layui-form-label">任务名称</label>
                <div class="layui-input-block" style="width: 200px">
                    <input type="text" name="name" required="required" lay-verify="required" placeholder="请输入任务名称" autocomplete="off" class="layui-input"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">任务组名</label>
                <div class="layui-input-block" style="width: 200px">
                    <input type="text" name="groupName" required="required" lay-verify="required" placeholder="请输入任务组名" autocomplete="off" class="layui-input"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">CRON</label>
                <div class="layui-input-block" style="width: 200px">
                    <input type="text" name="cronExp" required="required" lay-verify="required" placeholder="请输入CRON表达式" autocomplete="off" class="layui-input"/>
                </div>
            </div>
        </form>
    </div>

    <script src="/api-test/static/plugins/layui/layui.js"></script>
    <script src="/api-test/static/common/js/base.js"></script>
    <script src="/api-test/static/js/job/job.js"></script>
</body>
</html>